<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .lock {
            width: 100px;
            height: 200px;
            background: pink;
        }

        .unlock {
            width: 100px;
            height: 200px;
            background-color: yellow;
        }
    </style>
</head>

<body>
    <input type="button" onclick="this.style.backgroundColor = 'green'" value="点击我试试" name="" id="">
    <input type="button" value="开始" onmousemove="move(this,'purple')" onmouseout="out(this,'black')">
    <input type="button" value="结束" onmousemove="move(this,'yellow')" onmouseout="out(this,'gray')"><br>
    <input type="button" value="全选" name="" id="ipt4"><br>
    <div class="lock" name="" id="ipt5">锁定</div>
    <input type="button" value="录入">

    <script>
        function move(btn, c) {
            btn.style.color = c;
        }
        function out(btn, c) {
            btn.style.color = c;
        }
        var ipt = document.getElementById('ipt4');
        function select() {
            if (this.value == '全选') {
                this.value = '反选';
            } else {
                this.value = '全选';
            }
        }
        ipt.onclick = select;

        var btn5 = document.getElementById("ipt5");
        btn5.onclick = function () {
            this.className = 'unlock';
            this.innerHTML = "解锁"
        }

        var inputs = document.getElementsByTagName("input");
        var entry = inputs[4];
        entry.onclick = entryFn;
        function entryFn() {
            //补充代码
            var input = 1;
            var arr = [];
            while (input != -1) {
                var input = prompt("请输入员工姓名");
                arr.push(input);
            }
            arr.pop();
            for (var i = 0; i < arr.length; i++) {
                document.write("录入的第" + (i + 1) + "个员工信息是" + arr[i] + "<br>");

            }
        }
    </script>
</body>

</html>